/**
 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
 * This file is a part of the CANN Open Software.
 * Licensed under CANN Open Software License Agreement Version 2.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */

/* !
 * \file transpose_batch_mat_mul_tiling_key.h
 * \brief
 */

#ifndef TRANSPOSE_BATCH_MAT_MUL_TILING_KEY_H
#define TRANSPOSE_BATCH_MAT_MUL_TILING_KEY_H

#include "ascendc/host_api/tiling/template_argument.h"

#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE 0
#define TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE 1

#define TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE 0
#define TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_TRUE 1

#define TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_1_2 0
#define TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_2_1 1
#define TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2 2

#define TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2 0
#define TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_2_1 1

ASCENDC_TPL_ARGS_DECL(
    TransposeBatchMatMul,
    ASCENDC_TPL_UINT_DECL(
        BATCH_SPLIT, ASCENDC_TPL_2_BW, ASCENDC_TPL_UI_LIST, 
        TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE,
        TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE),
    ASCENDC_TPL_UINT_DECL(
        PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_2_BW, ASCENDC_TPL_UI_LIST, 
        TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE,
        TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_TRUE),
    ASCENDC_TPL_UINT_DECL(
        PERM_X1, ASCENDC_TPL_4_BW, ASCENDC_TPL_UI_LIST, 
        TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_1_2, 
        TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_2_1,
        TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2),
    ASCENDC_TPL_UINT_DECL(
        PERM_X2, ASCENDC_TPL_4_BW, ASCENDC_TPL_UI_LIST, 
        TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2,
        TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_2_1), );


ASCENDC_TPL_SEL(
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_1_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_0_1_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_TRUE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_FALSE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_TRUE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_1_2), ),
    ASCENDC_TPL_ARGS_SEL(
        ASCENDC_TPL_KERNEL_TYPE_SEL(ASCENDC_TPL_AIC_ONLY),
        ASCENDC_TPL_UINT_SEL(BATCH_SPLIT, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_BATCH_SPLIT_FALSE),
        ASCENDC_TPL_UINT_SEL(PP_MAT_MUL_EINSUM_MODE, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PP_MAT_MUL_EINSUM_MODE_TRUE),
        ASCENDC_TPL_UINT_SEL(PERM_X1, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X1_1_0_2),
        ASCENDC_TPL_UINT_SEL(PERM_X2, ASCENDC_TPL_UI_LIST, TRANSPOSE_BATCH_MAT_MUL_PERM_X2_0_2_1), ),);

#endif // TRANSPOSE_BATCH_MAT_MUL_TILING_KEY_H